<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>RMS 后台管理工作平台 </title>
<link rel="stylesheet" type="text/css" href="/RMS/css/style.css"/>
<script type="text/javascript" src="/RMS/js/js.js"></script>
<script type="text/javascript" src="/RMS/js/jquery-2.1.1.js"></script>
<script type="text/javascript">

	
	function form_submit(){
		var username = $("#username").val();
		var password = $("#password").val();
		if(username==""||password==""){
			alert("username和password不能为空！");
			return;
		}
		/*
		$.ajax({
              type: "POST",
              url: "/RMS/login/login.do",  //换成你要请求的action, paperId 是url参数
              data: {username:username,password:password},
              async: false,
              error: function(msg){
                 alert(msg);
              },
              success: function(msg){ 
                 alert(msg);
              }
    	});
*/
		var f = document.getElementById("login");
		f.action="/RMS/login/login.do";
		f.submit();
	}
	
	function isChang(values)
	{
	    if(values=="yxsh"){
	        hideElement("key");
	        showElement("yxsh");
	    }else{
	        hideElement("yxsh");
	        showElement("key");
	    }
	}

	//自定义方法hideElement()
	function hideElement(id){
	    document.getElementById(id).style.display="none";
	}
	//自定义方法showElement()
	function showElement(id){
	    document.getElementById(id).style.display="";
	}
	 
	
	

</script>
</head>
<body>
<div id="top"> </div>
<form id="login" name="login" action="/RMS/login/login.do" method="post">
  <div id="center">
    <div id="center_left"></div>
    <div id="center_middle">
      <div class="user">
        <label>用户名：
        <input type="text" name="username" id="username" /><span style="color:red;"  id="error_user"></span>
        </label>
      </div>
      <div class="user">
        <label>密　码：
        <input type="password" name="password" id="password" /><span style="color:red;" id="error_spass"></span>
        </label>
      </div>
      <div class="chknumber">
        <label>验证码：
        <input name="chknumber" type="text" id="chknumber" maxlength="4" class="chknumber_input" />
        </label>
        <img src="/RMS/images/checkcode.png" id="safecode" />
      </div>
    </div>
    <div id="center_middle_right"></div>
    <div id="center_submit">
      <div class="button"> <img src="/RMS/images/dl.gif" width="57" height="20" onclick="form_submit()" > </div>
      <div class="button"> <img src="/RMS/images/cz.gif" width="57" height="20" onclick="form_reset()"> </div>
    </div>
    <div id="center_right"></div>
  </div>
</form>
<div id="footer"></div>
</body>
</html>
